<?php

namespace addons\tools\library;

class Service
{
    /**
     * 请求第三方
     * @param $options
     * @return false|string|null
     */
    public function synthesis($options, $gateway = 'ali', $code = '')
    {
        $data = array();
        $data = array_merge($data, $options);
        return call_user_func_array([$this, $gateway], [$data, $code]);
    }

    /**
     * 阿里
     * @param $data
     * @param $code
     */
    private function ali($data, $code)
    {
        return (new \addons\tools\library\ali\Service())->synthesis($data, $code);
    }

    public function baidu($data, $event, $code)
    {

    }
}